package com.travel.server.manager.impl.command.article;

import com.travel.common.util.DateUtil;
import com.travel.server.manager.dto.request.article.data.QueryArticleDataRequest;
import com.travel.server.manager.dto.response.article.data.QueryArticleDataResponse;
import com.travel.server.manager.impl.command.AbstractCommand;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author: LiZhenhui
 * @Date: 2018/12/20 16:21
 * @Desc:
 */
@Component
public class QueryArticleDataCommand extends AbstractCommand<QueryArticleDataRequest, QueryArticleDataResponse> {
    @Override
    protected void checkInput(QueryArticleDataRequest request) {
        checkTimeInput(request);
    }

    @Override
    public QueryArticleDataResponse handle(QueryArticleDataRequest request) {
        checkInput(request);
        Date startTime = DateUtil.getDataTime(request.getStartTime());
        Date endTime = DateUtil.getDataEndTime(request.getEndTime());

        QueryArticleDataResponse response = new QueryArticleDataResponse();
        response.setBrowser(0);
        response.setExpose(0);
        response.setVisit(0);
        return response;
    }
}
